package cm.project;

import java.io.*;
import java.util.ArrayList;

public class Test12 {
    public static void main(String[] args) {

        try {
            BufferedReader br=new BufferedReader(new FileReader("Task4.txt"));
          String str=null;
          while ((str= br.readLine())!=null){
             if (str.contains("TMD")||str.contains("SB")){
                String s1= str.replace("TMD","***");
                String s2= str.replace("SB","**");
                 System.out.println(br);
             }

            }

        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
